<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ include file="../../Include/Config.jsp"%>
<html>
  <head>
    <title>Web Ram Program</title>
    <meta http-equiv="Content-Type" content="text/jsp; charset=utf-8">
    <link href="ram/style.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="js/jquery-1.7.1.js" ></script>
    <script type="text/javascript" >
       $(document).ready(function(){ 
    	$('body').keypress(function(e){
    	if(e.keyCode!=13) return;
    	 if(!$('input[name="search"]').val()) $('input[name="search"]').focus();
    	    var sysimgName = $("#searchContent").val();
            $("#sysimgName").val(sysimgName);
    	  $('form:eq(0)').submit();
    	 });
    	});

      $(function(){
          $("#searchImg").css("cursor","pointer").click(function(){
               var sysimgName = $("#searchContent").val();
                   $("#sysimgName").val(sysimgName);
                   $("form")[0].submit();                   
          });
      });
    </script>
  </head>
  <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  <form action="system-img-submit.do" method="post" >
     <input type="hidden" name="method" value="list" />
     <html:hidden styleId="sysimgName" name="sysimgForm" property="sysimgName" />
  </form>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="60">
          <!----- header ----------->
          <%@ include file="../../Include/Header.jsp"%>
          <!----- header end ----------->
        </td>
      </tr>
      <tr>
        <td>
          <div align="left">
            <table width="1251" border="0" cellpadding="0" cellspacing="0">
              <tr valign="top">
                <td width="180" height="473">
                  <%@ include file="../../Include/Admin_Left.jsp"%>
                </td>
                <td width="20">&nbsp;</td>
                <td>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td>
                        <!----<table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td height="30" align="center" bgcolor="#333333"><font color="#FFFFFF"><strong>System 이미지관리</strong></font></td>
                          </tr>
                          <tr>
                            <td height="1" bgcolor="f44901"></td>
                          </tr>
                          <tr>
                            <td bgcolor="#f4f4f4">
                              <table width="100%" border="0" cellspacing="0" cellpadding="10">
                                <tr>
                                  <td valign="top">
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                      <tr>
                                        <td height="22">
                                          <p align="right">Home&gt;Admin&gt;System 이미지관리</p>
                                        </td>
                                      </tr>
                                    </table>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>--->
						<img src="ram/images/sysimg-list.jpg">
                      </td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td height="25">
                        <table width="100%" cellpadding="5" cellspacing="0">
                          <tr>
                            <td width="80%">
                              <b style="color:#ff3300">전체:</b> <b><bean:write name="totalCount" /></b> 건
                            </td>
                            <td width="20%" align="right">
                              <!-- 입력 -->
                              <a href="system-img-form.do">
                                <img src="ram/images/btn_input.jpg" border="0">
                              </a>
                              <!-- 입력 -->
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                    <tr>
                      <td bgcolor="#dddddd">
                        <table width="100%" border="0" align="center" cellpadding="5" cellspacing="1">
                          <tr bgColor=#F4F4F4 height=30 align="center">
                            <td width="50" height="30" align=center><b>번호</b></td>
                            <td width="281" align=center>
                              <p>
                                <b>
                                       이미지명
                                </b>
                              </p>
                            </td>
                            <td width="281" align="center">
                              <b>
                                    구분
                              </b>
                            </td>
                            <td width="389">
                              <p>
                                <b>
                                       이미지
                                </b>
                              </p>
                            </td>
                          </tr>
                          <logic:iterate id="list" name="sysimgList" indexId="count">
                          <tr align=middle bgcolor="#ffffff" style="color: #555555" onmouseover='this.style.backgroundColor="#f5f5f5"' onmouseout='this.style.backgroundColor="#ffffff"' height="25">                          
                            <td align=center>${totalCount-count}</td>
                            <td align=center>
                              <p>
                                <a href="system-img-submit.do?method=info&amp;sysimgUid=${list.sysimgUid}">
                                  ${list.sysimgName}
                                </a>
                              </p>
                            </td>
                            <td width="281" align="center">
                              <logic:equal name="list" property="sysimgGubun" value="B">
                                Branch
                              </logic:equal>
                              <logic:equal name="list" property="sysimgGubun" value="E">
                                Equipment
                              </logic:equal>                              
                            </td>
                            <td align=center width="392">
                              <p>
                                <img src="ram/Admin/System_Img/Upload/${list.sysimgFile}">
                              </p>
                            </td>
                          </tr>                          
                          </logic:iterate>
                        </table>
                      </td>
                    </tr>
                    <tr>
                      <td height="30" align="center">
                        <b>[1]</b>
                      </td>
                    </tr>
                    <tr>
                      <td>
                        <select name='find'>
                          <option value="address">이미지명</option>
                        </select>
                        <input type='Text' size='15' name="search" id="searchContent" class="grayform" >
                          <img id="searchImg" src="ram/images/btn_search.jpg" align="absmiddle" border="0">
                      </td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                    </tr>
                  </table>
                  <p>&nbsp;</p>
                </td>
              </tr>
            </table>
          </div>
        </td>
      </tr>
      <tr>
        <td align="center">
          <%@ include file="../../Include/Foot.jsp"%>
        </td>
      </tr>
    </table>
  </body>
</html>
